<template>
  <Modal v-model="visable" @on-ok="okHandler">
    <div v-if="visable">
      <Form :model="model">
        <FormItem label="联系方式：" props="contact">
          <Input style="width: 350px" v-model="model.contact" />
        </FormItem>
         <FormItem label="意见建议：" props="content">
          <Input v-model="model.content" maxlength="500" :rows="6" show-word-limit type="textarea" style="width: 350px;" />
        </FormItem>
        <FormItem label="作者邮箱：">
          <a>929226676@qq.com</a>
        </FormItem>
      </Form>
    </div>
  </Modal>
</template>
<script>
export default {
  data() {
    return {
      visable: false,
      model: {
      },
    };
  },
  methods: {
    okHandler() {
      if(this.model.content == ""){
        this.$Message.info('大兄弟,有啥意见别不好意思说~');
        return;
      }
      this.$axios.post("api/yijian/add", this.model).then(res => {
        this.$Message.info('多谢球友的宝贵意见，我一定认真考虑!');
      });
    },
    show() {
      this.visable = true;
    },
  }
};
</script>
<style lang="less" scoped>
</style>